/*
     raw os - Copyright (C)  Lingjun Chen(jorya_txj).

    This file is part of raw os.

    raw os is free software; you can redistribute it it under the terms of the 
    GNU General Public License as published by the Free Software Foundation; 
    either version 3 of the License, or  (at your option) any later version.

    raw os is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
    See the GNU General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program. if not, write email to jorya.txj@gmail.com
                                      ---

    A special exception to the LGPL can be applied should you wish to distribute
    a combined work that includes raw os, without being obliged to provide
    the source code for any proprietary components. See the file exception.txt
    for full details of how and when the exception can be applied.
*/
/*	
 * 2012/10/08		tftp_func.h 
 *			by Nie Qiang <sddzycnq@gmail.com>
 */


#ifndef __TFTP_FUNC_H__
#define __TFTP_FUNC_H__

#include <raw_api.h>

//*---------------------------------------- stuctrue and macro-----------------------------------------

//*-------------------------------------------- function prototype-----------------------------------------

extern RAW_U32 make_ack(RAW_U16 num, char *buffer, RAW_U32 size );
extern RAW_U32 make_req(RAW_S8 type, RAW_U32 mode, const char *filename, char *buffer, RAW_U32 size);
extern RAW_U32 HEXstringToNum(const RAW_S8 *str, RAW_S32 length);
extern RAW_S32 goto_destadd(RAW_S8 *pcWriteBuffer, RAW_U32 xWriteBufferLen, const RAW_S8 * const pcCommandString);
extern RAW_S32 tftp_transport(RAW_S8 *pcWriteBuffer, RAW_U32 xWriteBufferLen, const RAW_S8 * const pcCommandString);


#endif

//*-------------------------------------------- end -----------------------------------------


